<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<import type="js" file="js.jquery" />
<import type="js" file="js.common" />
<import type="css" file="css.global" />
<import type="css" file="css.form" />
</head>
<body>
<div class="search">
<input type="button" value="添加" class="button" title="新建角色" onclick="add()" >
</div>
<div class="list">
<table class="stripe" cellspacing="0">
    <thead>
        <tr>
            <th width="30px"><input type="checkbox" name="checkid" onclick="if(this.checked==true) { checkAll('key'); } else { clearAll('key'); }" ></th>
            <th width="80px">序号</th>
            <th width="35%">角色名称</th>
            <th width="35%">角色等级</th>
            <th width="20%">操作</th>
        </tr>
    </thead>
 
    <tbody>
      <volist name="data" id="vo">
        <tr>
            <td><input type="checkbox" name="key" value="11"></td>
            <td>{$key+1}</td>
            <td>{$vo.priv_name}</td>
            <td>{$vo.leve}</td>
            <td><a href="javascript:void(0);" onclick="edit({$vo.id});" >编辑</a>  |  <a href="javascript:void(0);" onclick="del({$vo.id})">删除</a>  |  <a href="javascript:void(0);" onclick="purview({$vo.id})">编辑权限</a></td>
        </tr>
      </volist>
    </tbody>
</table>
</div>
</body>
</html>
<script language="javascript">
$(document).ready(function(){  
	$(".stripe tr").mouseover(function(){    
	  $(this).addClass("over");}).mouseout(function(){   
			$(this).removeClass("over");}) 
  	$(".stripe tr:even").addClass("alt");
});   
function add(){
	window.location="__APP__/Priv/add";
}
function edit(id){
	window.location="__APP__/Priv/edit?id="+id;
}
function del(id){
	if (confirm("真的要删除吗？")){
		$.get("__APP__/Priv/delete?id="+id,function(result){
			alert(result);
			location.reload();
		});
	}else{
		return false;
	}
}
function purview(id){
	window.location="__APP__/Priv/purview?id="+id;
}
</script>  